<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    class Father {
        constructor(name) {            // father上
            console.log('constructor',this) // this指向 实例father
            this.name = name;
        }

        getName() {             // Father.prototype
            // this指向 实例father
            return this.name;
        }

        static easyGetName() {    // Father
            return getName();
             // this指向Father
        }
    }
    
    // todo:  子类如何继承父类的静态方法?
    class Son extends Father{
        // static easyGetName() {    // Son 
        //    return super.easyGetName()
        // }
    }
    let father = new Father('tom')
    console.log('father',father)
    let son = new Son('jack');
    console.log(son.getName(),son)
    // console.log(Son.easyGetName())
    
    
</script>
</body>
</html>